The present invention relates to a semiconductor device provided with a data security protection function, data ciphering and deciphering methods, and a storage medium for storing software for activating the security protection function of the semiconductor device.
Generally, non-volatile semiconductor memory devices can be roughly classified into a mask ROM (Read Only Memory) and an EEPROM (Electrically Erasable Programmable Read Only Memory). The mask ROM stores data on the basis of the presence or absence of contact holes or active field oxide films. On the other hand, the EEPROM stores data on the basis of the presence or absence of electric charges.
The mask ROM has a relatively small area required for storing one-bit data and thereby a high integration is enabled. However, when the structure thereof is analyzed under a microscope, the stored data can be easily under-stood. Therefore, it has been impossible to store secret data by use of the mask ROM as it is.
A semiconductor device provided with the security protection function is disclosed in Japanese Patent Laid-Open No. 4(1992)-232588. Particularly, this device is provided with the security protection function for IC cards. The semiconductor device includes a ROM for storing software for basic control, etc., an EEPROM for storing a program for ciphering and a ciphering key, a RAM for storing an identification number of a manufacturer, etc., and a CPU for controlling the ciphering function.
Further, Japanese Patent Laid-Open No. 4(1992)-11420 discloses a one-chip microcomputer provided with a non-volatile memory for storing ID data to be ciphered, a ciphering circuit for ciphering the ID data, a control circuit, etc.
Further, Japanese Patent Laid-Open No. 63(1988)-293637 discloses a one-chip microcomputer provided with a non-volatile memory (ROM) for storing a ciphered program and ID data, a volatile memory (RAM) for storing keys for ciphering and deciphering, and a rewritable memory (EEPROM) for storing data ciphered by the ciphering key.
In these semiconductor devices, since the EEPROM stores data on the basis of the presence or absence of electric charge accumulation, it is impossible to decipher the stored program on the basis of structural analysis. Therefore, it is impossible to decipher the logic for ciphering and deciphering secret data. Accordingly, it has been extremely difficult to decipher the secret data ciphered in the mask ROM.
However, because the EEPROMs of these semiconductor device have a relatively large area required for one-bit data, there exists a problem in that a high integration is difficult to achieve. In addition, in these devices, since the secret data are ciphered and deciphered by processing programs by use of a CPU, there exist other problems in that a relatively long time is required to output data and further in that the CPU cannot execute other processing while the data are being output.
As described above, in the non-volatile semiconductor devices provided with a security protection function, there exists a problem in that a high integration is difficult and therefore the device cannot be manufactured at a low cost. In addition, the non-volatile semiconductor devices involve the problem that the stored data cannot be output at high speed and further, other different processing cannot be executed by the arithmetic unit while the data are being output.